package com.wicket.okrbff.web.contorller;

import cn.hutool.core.bean.BeanUtil;
import com.wicket.okrbff.biz.service.SecurityService;
import com.wicket.okrbff.biz.service.dto.req.*;
import com.wicket.okrbff.biz.service.dto.res.*;
import com.wicket.okrbff.common.ro.OkrResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import java.util.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.wicket.okrapp.integration.FwAppSecurityClient;
import com.wicket.okrapp.integration.dto.JudgeStandardDetermineTenantCertificateAvailabilityAbnormalComRespDto;
import com.wicket.okrapp.integration.dto.JudgeStandardDetermineTenantCertificateAvailabilityAbnormalComReqDto;
import com.wicket.okrbff.common.exception.Assert;
import com.wicket.okrapp.integration.dto.JudgeDetermineTenantKeyAvailabilityRespDto;
import com.wicket.okrapp.integration.dto.JudgeDetermineTenantKeyAvailabilityReqDto;

/**
 * @author ：
 * @date ：
 *
 *
 * @version 1.0
 */
@Api(value = "Security", tags = { "Security" })
@RestController
// @RequestMapping("/oms/security/")
public class SecurityController {

  @Autowired
  SecurityService securityService;
/**
   * B3新增通用租户规划证书及异常(公共)
   * gen by moon at 5/12/2023, 3:05:00 AM
   */
    @PostMapping("/oms/security/addStandardDetermineTenantCertificateAvailabilityAbnormalCom")
    @ApiOperation(value = "B3新增通用租户规划证书及异常(公共)", response = OkrResult.class)
    public OkrResult<BffAddStandardDetermineTenantCertificateAvailabilityAbnormalComRespDto> addStandardDetermineTenantCertificateAvailabilityAbnormalCom(@RequestBody(required=false) @Validated BffAddStandardDetermineTenantCertificateAvailabilityAbnormalComReqDto reqDTO){
        return OkrResult.success(securityService.addStandardDetermineTenantCertificateAvailabilityAbnormalCom(reqDTO));
    }
/**
   * B3判断租户规划钥匙可用(管理)
   * gen by moon at 5/12/2023, 3:15:11 AM
   */
    @PostMapping("/oms/mgt/security/judgeDetermineTenantKeyAvailability")
    @ApiOperation(value = "B3判断租户规划钥匙可用(管理)", response = OkrResult.class)
    public OkrResult<BffJudgeDetermineTenantKeyAvailabilityRespDto> judgeDetermineTenantKeyAvailability(@RequestBody(required=false) @Validated BffJudgeDetermineTenantKeyAvailabilityReqDto reqDTO){
        return OkrResult.success(securityService.judgeDetermineTenantKeyAvailability(reqDTO));
    }
}
